detect if an element has a class jQurey

79

if ($(".mydivclass")[0]){
    // Do something if class exists
} else {
    // Do something if class does not exist
}

Comments

Submit
0 Comments